package cn.xshi.bpm.web;

import cn.xshi.bpm.param.original.StartParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import cn.xshi.common.base.BaseAction;
import cn.xshi.common.base.BaseResult;
import cn.xshi.bpm.service.OriginalService;
import cn.xshi.bpm.vo.ActivityProcessStatusEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;

/**
 * @Desc 原生态引擎处理服务
 * @Author 邓纯杰
 * @CreateTime 2012-12-12 12:12:12
 */
@Api(value = "原生态引擎处理服务",description = "原生态引擎处理服务", tags = "原生态引擎处理服务")
@RestController
@RequestMapping("/original")
public class OriginalController extends BaseAction {

    @Resource
    OriginalService originalService;

    /**
     * 根据部署编号及其它条件发起流程实例（其它条件可省略，原生态）
     * @param startParam
     * @return
     */
    @ApiOperation(value="根据部署编号及其它条件发起流程实例（其它条件可省略，原生态）", notes="根据部署编号及其它条件发起流程实例（其它条件可省略，原生态）")
    @PostMapping(value="/startProcessInstance")
    public BaseResult<ActivityProcessStatusEntity> startProcessInstance(@RequestBody StartParam startParam){
        return originalService.startProcessInstance(startParam);
    }
}
